/*
 * =====================================================================================
 *
 *       Filename:  CloseingState.cc
 *
 *    Description:
 *
 *        Version:  1.0
 *        Created:  01/04/2022 03:39:40 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  first_name last_name (fl), fl@my-company.com
 *        Company:  my-company
 *
 * =====================================================================================
 */
#include "CloseingState.h"
#include "Context.h"
#include <iostream>

#include "Log.h"

using std::string;
using std::cout;
using std::endl;

static const string TAG = "Context";

CloseingState::CloseingState(void) {
}

CloseingState::~CloseingState(void) {
}

void CloseingState::Open() {
    LogI("In");
    this->LiftState::m_pContext->SetLiftState(Context::pOpenningState);
    this->LiftState::m_pContext->GetLiftState()->Open();
}

void CloseingState::Close() {
    LogI("电梯门关闭...");
}

void CloseingState::Run() {
    LogI("In");
    this->LiftState::m_pContext->SetLiftState(Context::pRunningState);
    this->LiftState::m_pContext->GetLiftState()->Run();
}

void CloseingState::Stop() {
    LogI("In");
    this->LiftState::m_pContext->SetLiftState(Context::pStoppingState);
    this->LiftState::m_pContext->GetLiftState()->Stop();
}
